/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.scaroo.injectedgallery;

import java.util.Collection;
import javax.enterprise.inject.Alternative;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 *
 * @author alexandremazari
 */
@Alternative @Entity
public class Album {

    @Id
    private String name;
    private String description;
    private Collection<Picture> pictures;


    public void add(Picture picture) {
        pictures.add(picture);
    }

    Picture getCover() {
        return pictures.iterator().next();
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    
}
